package org.spring.springboot.app.file.domain.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
@Data
@EqualsAndHashCode(callSuper = false)
public class FileSearchVO implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "所属类型（1.图片 2.视频 3.网页文件 4.压缩包 5.excel文件 6. 其它）")
    private String type;

    @ApiModelProperty(value = "appId",required = true)
    private String appId;

    @ApiModelProperty(value = "页数")
    private Integer pageNum;
    @ApiModelProperty(value = "每页行数")
    private Integer pageSize;

    public Integer getPageNum() {
        if(pageNum == null){
            pageNum = 1;
        }
        return pageNum;
    }
    public Integer getPageSize() {
        if(pageSize == null){
            pageSize = 20;
        }
        if(pageSize > 100){
            pageSize = 100;
        }
        return pageSize;
    }
}
